package com.itheima.reggie.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Page<T> {
    private List<T> records;
    private long total;//如果达成包装类型Long的话,会出现一个不会显示的前端total的总数！
    private Integer page;
    private Integer pageSize;
    private Integer pages;

    public Page(List<T> records, long total, Integer page, Integer pageSize) {
        this.records = records;
        this.total = total;
        this.page = page;
        this.pageSize = pageSize;
    }
}
